<template>
  <div>
    <slot name="title" :title="title"></slot>
    <table class="table table-bordered table-stripped">
      <!-- 表格标题区域 -->
      <thead>
        <tr>
          <th>编号</th>
          <th>资产名称</th>
          <th>价格</th>
          <th>创建时间</th>
          <th>操作</th>
        </tr>
      </thead>
      <!-- 表格主体区域 -->
      <tbody>
        <tr v-for="item in list" :key="item.id">
          <td>
            <slot name="Id" :Id="item.id">
              {{ item.id }}
            </slot>
          </td>
          <td>
            <slot name="name" :names="item.name">
              {{ item.name }}
            </slot>
          </td>
          <td>
            <slot name="price" :price="item.price">
              {{ item.price }}
            </slot>
          </td>
          <td>
            <slot name="time" :time="item.time">
              {{ item.time }}
            </slot>
          </td>
          <td>
            <button>
              <slot name="msg" :msg="msg"></slot>
            </button>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</template>

<script>
import 'bootstrap/dist/css/bootstrap.css'

export default {
  props: {
    list: {
      type: Array,
      required: true
    }
  },
  data () {
    return {
      title: '品牌大管理',
      msg: '删除'
    }
  },

  created () {},

  methods: {}
}
</script>

<style scoped lang="less">
.my-goods-list {
  .badge {
    margin-right: 5px;
  }
}
</style>
